﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace borkoSi
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            
            // Gallery
            routes.MapRoute(
                "Album",
                "Gallery/Album/{id}",
                new { controller = "Gallery", action = "Album", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                "Gallery", // Route name
                "Gallery/Index", // URL with parameters
                new { controller = "Gallery", action = "Index" } // Parameter defaults
            );

            // Cycling
            routes.MapRoute(
                "Route",
                "Cycling/Route/{id}",
                new { controller = "Cycling", action = "Route", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                "Cycling", // Route name
                "Cycling/Index", // URL with parameters
                new { controller = "Cycling", action = "Index" } // Parameter defaults
            );
            
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}